package com.chuangshu.chuangshuteam.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 获奖记录实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("award_records")
public class AwardRecords implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;//不必要

    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 团队ID
     */
    private Long teamId = 1L;

    /**
     * 比赛ID
     */
    private Long competitionId;//competitionId和competitionNameManual不能同时为空

    /**
     * 手动输入的比赛名称
     */
    private String competitionNameManual;//competitionId和competitionNameManual不能同时为空

    /**
     * 获奖等级
     */
    private String awardLevel;

    /**
     * 获奖日期
     */
    private LocalDate awardDate;

    /**
     * 证明文件URL
     */
    private String proofUrl;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 删除时间
     */
    private LocalDateTime deletedAt;

    private String name;
}
